import request from '@/utils/request'

// 查询采购入库单列表
export function listEntry(query) {
  return request({
    url: '/purchasing/entry/list',
    method: 'get',
    params: query
  })
}

// 查询采购入库单详细
export function getEntry(entryId) {
  return request({
    url: '/purchasing/entry/' + entryId,
    method: 'get'
  })
}

// 查询采购入库单详细
export function changeEntryState(entryId) {
  return request({
    url: '/purchasing/entry/state/' + entryId,
    method: 'get'
  })
}

// 新增采购入库单
export function addEntry(data) {
  return request({
    url: '/purchasing/entry',
    method: 'post',
    data: data
  })
}

// 修改采购入库单
export function updateEntry(data) {
  return request({
    url: '/purchasing/entry',
    method: 'put',
    data: data
  })
}

// 删除采购入库单
export function delEntry(entryId) {
  return request({
    url: '/purchasing/entry/' + entryId,
    method: 'delete'
  })
}
